<?php
//汽车
class BikeBuilder implements BuilderInterface{
    protected $bike;
    public function createGongju(){
        $this->bike = new Car();
    }
    //创建轮子
    public function createWheel(){
        $this->bike->setParts('wheel1', new Wheel());
        $this->bike->setParts('wheel2', new Wheel());
    }
    //创建门
    public function createDoor(){
    }
    //创建发动机引擎
    public function createEngine(){
        $this->bike->setParts('engine', new Engine());
    }

    //获取创建好的工具
    public function getGongju(){
        return $this->bike;
    }
}